<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>验证码</title>
    <script>
        window.onload=function () {
            var elementById = document.getElementById("refresh");

            function f() {
                var date = new Date().getTime();
                elementById.src="/day09_Servlet/checkCode?"+date;

            }
            elementById.onclick=f;
            var elementById1 = document.getElementById("change");
            elementById1.onclick=f;
        }
    </script>
</head>
<body>
    <img src="/day09_Servlet/checkCode" id="refresh">
    <a href="javascript:void(0);" id="change">看不清，换一张</a>
</body>
</html>